<template>
  <div>
    <div style="padding: 10px;display: flex;align-items: center;">
      <el-date-picker
        v-model="date"
        type="daterange"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        @change="changeDate"
        :default-time="['00:00:00', '23:59:59']">
      </el-date-picker>
      <div style="margin-left: 15px;">
         <el-button type="primary" icon="el-icon-search" >搜索</el-button>
      </div>
      <div style="margin-left: 15px;">
         <el-button  type="info" plain icon="el-icon-refresh-right" >重置</el-button>
      </div>
      <div style="margin-left: 15px;">
         <el-button  type="success" plain icon="el-icon-folder-add" >上传文件</el-button>
      </div>
      <div style="margin-left: 15px;">
         <el-button  type="info" plain icon="el-icon-right" >筛选表格</el-button>
      </div>
    </div> 
    <el-table
      style="overflow: auto; flex: 0.9"
      :data="res.Items"
      stripe
      border
      highlight-current-row
    >
      <el-table-column type="index" width="40"></el-table-column>
      <el-table-column label="上传时间">
        <template slot-scope="scope">
          {{ scope.row.uploadTime | formatTime }}
        </template>
      </el-table-column>
      <el-table-column label="上传内容描述">
        <template slot-scope="scope">
          {{ scope.row.updateContent }}
        </template>
      </el-table-column>
      <el-table-column label="上传人">
        <template slot-scope="scope">
          {{ scope.row.updateUser }}
        </template>
      </el-table-column>
      <el-table-column fixed="right" label="操作">
        <template slot-scope="scope">
          <el-button
            type="text"
            size="small"
            icon="el-icon-tickets"
          >
            查看
          </el-button>
          <el-button
            type="text"
            size="small"
            style="color: red;"
            icon="el-icon-delete"
          >
            删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <div style="width: 100%; height: 40px">
      <el-pagination
        layout="total,prev,pager,next,sizes"
        style="float: right"
        background
        :current-page.sync="req.pageIndex"
        :total="res.Total"
        :page-size="req.pageSize"
        :page-sizes="[10, 15, 20]"
        @size-change="
          (val) => {
            req.pageSize = val
            getApps()
          }
        "
        @current-change="getApps()"
      ></el-pagination>
    </div>
    
  </div>
</template>
<script>
import { baseURL, tokenName, empIdName } from '@/config'
export default {
  data: function () {
    return {
      req: {
        code: '',
        pageIndex: 1,
        pageSize: 10,
      },
      res: {
        Items: [
          {
            uploadTime:'2025/2/21 11:35',
            updateUser:'李木子',
            updateContent:'数据输入'
          },
          {
            uploadTime:'2025/2/21 13:23',
            updateUser:'李木子',
            updateContent:'数据输入2'
          }
        ],
        Total: 0,
      },
      version: '',
      updateContent: '',
      fileUploadUrl: baseURL + 'api/Developer/AppVersion/UploadApp',
      uploadVis: false,
      date:''
    }
  },
  created() {
      
  },
  methods: {
    changeDate(value){
      console.log(value);
      
    }
  },
  
}
</script>
<style>
.el-drawer.rtl {
  overflow: scroll;
}
</style>
<style scoped>
.upload-button {
  width: 50px;
  height: 50px;
  background-color: #f3f3f3;
  font-size: 16px;
  color: #5f85f6;
  margin-left: 16px;
  margin-top: 10px;
}
</style>
